<template>
  <div>
    <div><button @click="isShow = !isShow">显示/隐藏</button></div>
    <transition name="why">
      <h2 class="title" v-if="isShow">Hello World</h2>
    </transition>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style lang="less">
.title {
  display: inline-block;
}
.why-enter-active {
  animation: bounceInUp 1s ease-in;
}
.why-leave-active {
  animation: bounceInUp 1s ease-out reverse;
}
</style>
